def makeConnString(params):
    """Build a connection string from a dict of params.

    Return string."""

    return ';'.join(["%s=%s" % (k, v) for k, v in params.items()])

if __name__ == "__main__":
    myParams = {
            "server" : "127.0.0.1",
            "db" : "db",
            "uid" : "yangxin",
            "pwd" : "pwd"
            }
    
    print makeConnString(myParams)

